package com.wzq.demospringbatch.batch.demo.chunk.processor;

import com.wzq.demospringbatch.batch.entity.TestData;
import org.springframework.batch.item.ItemProcessor;
import org.springframework.stereotype.Component;

/**
 * 数据过滤器Process
 */
@Component
public class DataFilterItemProcessor implements ItemProcessor<TestData, TestData> {


    @Override
    public TestData process(TestData testData) throws Exception {
        if("".equals(testData.getName())){
            return null;
        }
        return testData;
    }
}
